package com.project.demo.controller;

import com.project.demo.entity.Government;
import com.project.demo.entity.Hotspot;
import com.project.demo.mapper.GovernmentMapper;
import com.project.demo.mapper.HotspotMapper;
import com.project.demo.vo.AffairsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class GovernmentController {
    @Autowired(required = false)
    GovernmentMapper governmentMapper;
    
    @RequestMapping("/showgovernment")
    public AffairsVo showgovernment(){
        List<Government> Governmentlist = governmentMapper.selectList(null);

        AffairsVo affairsVo=new AffairsVo();
        affairsVo.setCode(0);
        affairsVo.setData(Governmentlist);
        affairsVo.setMsg("");
        affairsVo.setCount(Governmentlist.size());
        return  affairsVo;
    }
    @RequestMapping("/showgovernment1")
    public  List<Government> showgovernment1(){
        List<Government> Governmentlist = governmentMapper.selectList(null);


        return  Governmentlist;
    }
}
